package com.fivestar.finance.app.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * 发货地 配送地 详情
 *
 * @author Derek.Kidd
 * @version V1.0.0
 * @date 2016-04-25 16:22
 */
public class Address implements Serializable, Parcelable {


    /**
     * 位置index（0为起始点/发货地）
     */
    int index;

    /**
     * 位置经度
     */
    double posiLongi;
    /**
     * 位置纬度
     */
    double posiLatit;

    /**
     * 位置信息
     */
    String posiName;

    /**
     * 位置信息
     */
    String posiSubName;
    /**
     * 联系人名称
     */
    String linkManName;
    /**
     * 联系人电话
     */
    String linkManMobile;

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public double getPosiLongi() {
        return posiLongi;
    }

    public void setPosiLongi(double posiLongi) {
        this.posiLongi = posiLongi;
    }

    public double getPosiLatit() {
        return posiLatit;
    }

    public void setPosiLatit(double posiLatit) {
        this.posiLatit = posiLatit;
    }

    public String getPosiName() {
        return posiName;
    }

    public void setPosiName(String posiName) {
        this.posiName = posiName;
    }

    public String getLinkManName() {
        return linkManName;
    }

    public void setLinkManName(String linkManName) {
        this.linkManName = linkManName;
    }

    public String getPosiSubName() {
        return posiSubName;
    }

    public void setPosiSubName(String posiSubName) {
        this.posiSubName = posiSubName;
    }

    public String getLinkManMobile() {
        return linkManMobile;
    }

    public void setLinkManMobile(String linkManMobile) {
        this.linkManMobile = linkManMobile;
    }

    public static Creator<Address> getCREATOR() {
        return CREATOR;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.index);
        dest.writeDouble(this.posiLongi);
        dest.writeDouble(this.posiLatit);
        dest.writeString(this.posiName);
        dest.writeString(this.linkManName);
        dest.writeString(this.linkManMobile);
    }

    public Address() {
    }

    protected Address(Parcel in) {
        this.index = in.readInt();
        this.posiLongi = in.readDouble();
        this.posiLatit = in.readDouble();
        this.posiName = in.readString();
        this.linkManName = in.readString();
        this.linkManMobile = in.readString();
    }

    public static final Creator<Address> CREATOR = new Creator<Address>() {
        @Override
        public Address createFromParcel(Parcel source) {
            return new Address(source);
        }

        @Override
        public Address[] newArray(int size) {
            return new Address[size];
        }
    };

    @Override
    public String toString() {
        return "Address{" +
                "index=" + index +
                ", posiLongi=" + posiLongi +
                ", posiLatit=" + posiLatit +
                ", posiName='" + posiName + '\'' +
                ", posiSubName='" + posiSubName + '\'' +
                ", linkManName='" + linkManName + '\'' +
                ", linkManMobile='" + linkManMobile + '\'' +
                '}';
    }
}
